home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / File::Path.Z / File::Path
Encoding:
Text File  |  1998-10-28  |  3.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      FFFFiiiilllleeee::::::::PPPPaaaatttthhhh((((3333))))   22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))     FFFFiiiilllleeee::::::::PPPPaaaatttthhhh((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       File::Path - create or remove    a series of directories
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       use File::Path
  13.  
  14.       mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
  15.  
  16.       rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.       The mkpath function provides a convenient way    to create
  20.       directories, even if your mkdir kernel call won't create
  21.       more than one    level of directory at a    time.  mkpath takes
  22.       three    arguments:
  23.  
  24.       +o   the name of the path to create, or a reference to    a list
  25.           of paths to create,
  26.  
  27.       +o   a    boolean    value, which if    TRUE will cause    mkpath to
  28.           print the    name of    each directory as it is    created
  29.           (defaults    to FALSE), and
  30.  
  31.       +o   the numeric mode to use when creating the    directories
  32.           (defaults    to 0777)
  33.  
  34.       It returns a list of all directories (including
  35.       intermediates, determined using the Unix '/' separator)
  36.       created.
  37.  
  38.       Similarly, the rmtree    function provides a convenient way to
  39.       delete a subtree from    the directory structure, much like the
  40.       Unix command rm -r.  rmtree takes three arguments:
  41.  
  42.       +o   the root of the subtree to delete, or a reference    to a
  43.           list of roots.  All of the files and directories below
  44.           each root, as well as the    roots themselves, will be
  45.           deleted.
  46.  
  47.       +o   a    boolean    value, which if    TRUE will cause    rmtree to
  48.           print a message each time    it examines a file, giving the
  49.           name of the file,    and indicating whether it's using
  50.           rmdir or unlink to remove    it, or that it's skipping it.
  51.           (defaults    to FALSE)
  52.  
  53.       +o   a    boolean    value, which if    TRUE will cause    rmtree to skip
  54.           any files    to which you do    not have delete    access (if
  55.           running under VMS) or write access (if running under
  56.           another OS).  This will change in    the future when    a
  57.           criterion    for 'delete permission'    under OSs other    than
  58.           VMS is settled.  (defaults to FALSE)
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      FFFFiiiilllleeee::::::::PPPPaaaatttthhhh((((3333))))   22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))     FFFFiiiilllleeee::::::::PPPPaaaatttthhhh((((3333))))
  71.  
  72.  
  73.  
  74.       It returns the number    of files successfully deleted.
  75.       Symlinks are treated as ordinary files.
  76.  
  77.       NNNNOOOOTTTTEEEE::::    If the third parameter is not TRUE, rmtree is uuuunnnnsssseeeeccccuuuurrrreeee
  78.       in the face of failure or interruption.  Files and
  79.       directories which were not deleted may be left with
  80.       permissions reset to allow world read    and write access.
  81.       Note also that the occurrence    of errors in rmtree can    be
  82.       determined _o_n_l_y by trapping diagnostic messages using
  83.       $SIG{__WARN__}; it is    not apparent from the return value.
  84.       Therefore, you must be extremely careful about using
  85.       rmtree($foo,$bar,0 in    situations where security is an    issue.
  86.  
  87.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  88.       Tim Bunce <_T_i_m._B_u_n_c_e@_i_g._c_o._u_k> and Charles Bailey
  89.       <_b_a_i_l_e_y@_g_e_n_e_t_i_c_s._u_p_e_n_n._e_d_u>
  90.  
  91.      RRRREEEEVVVVIIIISSSSIIIIOOOONNNN
  92.       Current $VERSION is 1.0401.
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.